/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2022/12/12 14:19
 * @copyright: 博为峰
 */
public class ArrayTest01 {
    public static void main(String[] args) {
        //最值
        int[] arr = {20, 9, 15, 3, 26, 6, 11};

        int max = arr[0];

        /*if(arr[1] > max){
            max = arr[1];
        }*/

        /*if(arr[2] > max){
            max = arr[2];
        }*/

        for (int i = 1; i < arr.length; i++) {
            if(arr[i] > max){
                max = arr[i];
            }
        }

        System.out.println("max = " + max);
    }
}
